package com.way.demo.comm2;

import com.way.demo.comm.Assert;

import java.text.MessageFormat;

/**
 * @author lipingwei
 * @create 2021-02-09 14:37
 */
public interface BusinessExceptionAssert extends IResponseEnum, Assert {
    @Override
    default BaseException newException(Object... args) {
        String msg = MessageFormat.format(this.getMessage(), args);

        return new BusinessException2(this, args, msg);
    }

    @Override
    default BaseException newException(Throwable t, Object... args) {
        String msg = MessageFormat.format(this.getMessage(), args);

        return new BusinessException2(this, args, msg, t);
    }

}
